package com.ccg.plat.presentation.common.util

import android.app.Activity
import android.content.Intent
import com.ccg.plat.presentation.ui.feature2.view.MainActivity
import com.ccg.plat.presentation.ui.feature3.view.RoomListActivity
import com.ccg.plat.presentation.ui.feature4.view.VideoTagActivity
import com.ccg.plat.presentation.ui.feature5.view.VideoListActivity
import com.ccg.plat.presentation.ui.feature6.view.VideoPlayerActivity
import com.ccg.plat.presentation.ui.feature7.view.VideoPlayerTwoActivity
import com.ccg.plat.presentation.ui.feature8.view.CollectActivity

/**
 * @author : C4_雍和
 * 描述 :
 * 主要功能 :
 * 维护人员 : C4_雍和
 * date : 2025/8/9 8:07
 */
object NavigationUtils {
    /**
     * 跳转到首页
     * @param context Activity
     */
    fun goMainActivity(context: Activity) {
        context.startActivity(Intent(context, MainActivity::class.java))
        context.finish()
    }

    /**
     * 跳转到房间列表页面
     * @param context Activity
     */
    fun goRoomListActivity(context: Activity) {
        context.startActivity(Intent(context, RoomListActivity::class.java))
    }

    /**
     * 跳转到视频类型页面
     * @param context Activity
     */
    fun goVideoTagActivity(context: Activity, json: String) {
        val intent = Intent(context, VideoTagActivity::class.java)
        intent.putExtra("json", json)
        context.startActivity(intent)
    }

    /**
     * 跳转到视频列表页面
     * @param context Activity
     */
    fun goVideoListActivity(context: Activity, url: String) {
        val intent = Intent(context, VideoListActivity::class.java)
        intent.putExtra("url", url)
        context.startActivity(intent)
    }

    /**
     * 跳转到视频列表页面
     * @param context Activity
     */
    fun goVideoPlayerActivity(context: Activity, json: String) {
        val intent = Intent(context, VideoPlayerActivity::class.java)
        intent.putExtra("json", json)
        context.startActivity(intent)
    }

    /**
     * 跳转到视频列表页面
     * @param context Activity
     */
    fun goVideoPlayerTwoActivity(context: Activity, json: String) {
        val intent = Intent(context, VideoPlayerTwoActivity::class.java)
        intent.putExtra("json", json)
        context.startActivity(intent)
    }

    /**
     * 跳转到房间列表页面
     * @param context Activity
     */
    fun goCollectActivity(context: Activity) {
        context.startActivity(Intent(context, CollectActivity::class.java))
    }
}